package cn.sumpu.app.guoguojie.biz;

import java.util.*;

import javax.servlet.http.HttpServletRequest;

import cn.sumpu.app.guoguojie.domain.*;
import cn.sumpu.app.guoguojie.exception.AppBusinessException;
import cn.sumpu.app.guoguojie.util.PageModel;

public interface DoingTagShowBiz {

	/**
	 * author BruceZhang
	 * @param doingTagShow
	 * 添加前台标签
	 * @throws AppBusinessException
	 */
	void addDoingTagShow(DoingTagShow doingTagShow)throws AppBusinessException;
	
	/**
	 * author BruceZhang
	 * @param doingTagShow
	 * 更改前台标签
	 * @throws AppBusinessException
	 */
	void updateDoingTagShow(DoingTagShow doingTagShow)throws AppBusinessException;

	/**
	 * author BruceZhang
	 * @param map 父节点ID（parentIdentifier）
	 * @return	这个父节点下的所有标签
	 * @throws AppBusinessException
	 */
	List<DoingTagShow> getDoingTagShow(String parentIdentifier)throws AppBusinessException;
	
	/**
	 * author BruceZhang
	 * @param map 父节点ID（parentIdentifier）
	 * @return	根据父ID取得字节点
	 * @throws AppBusinessException
	 */
	List<DoingTagShow> getDstByParentId(String parentId)throws AppBusinessException;
	
	/**
	 * author BruceZhang
	 * @param id	前台标签ID
	 * @return	一个标签实体
	 * @throws AppBusinessException
	 */
	DoingTagShow getDstById(String id)throws AppBusinessException;
	
	/**
	 * author BruceZhang
	 * @param map	id
	 * 删除前台标签
	 * @throws AppBusinessException
	 */
	void deleteDoingTagShow(String ids)throws AppBusinessException;
	void deleteDoingTagShowAll(String id)throws AppBusinessException;
	String getChildrenBackTag(String parentId)throws AppBusinessException;
	
	
	/**
	 * author BruceZhang
	 * @param map 条件：标签/价格
	 * @return 查询格子屋
	 * @throws AppBusinessException
	 */
	PageModel getGridByCondition(String channel, String pdId, String tagId, Integer minPrice,
			Integer maxPrice, Integer page, Integer times,String mobileMove,String currentDoingId) throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param map 条件：标签/价格
	 * @return 查询格子屋的记录数
	 * @throws AppBusinessException
	 */
	int getGridCount(String channel, String pIds, Integer minPrice, Integer maxPrice)
			throws AppBusinessException;
	
	/**
	 * author BruceZhang
	 * @param map	条件：标签/价格/延迟时间
	 * @return		查询格子屋最新
	 * @throws AppBusinessException
	 */
	PageModel getGridNew(String pdId, String tagId, Integer page, Integer times, Integer minPrice, Integer maxPrice, String mobileMove,String currentDoingId)throws AppBusinessException;
	
	/**
	 * author BruceZhang
	 * @param map	条件：标签/价格/延迟时间
	 * @return		查询格子屋最新总记录数
	 * @throws AppBusinessException
	 */
	int getGridNewCount(String pIds,  Date delayTime, Integer minPrice, Integer maxPrice)throws AppBusinessException;
	
	/**
	 * @author BruceZhang
	 * @param spfl			大分类
	 * @param id			标签ID
	 * @param type			推荐类型：推荐（commend）/最新（new）
	 * @param page			页码
	 * @param times			一次页码里第几次取
	 * @param minPrice		最小价格
	 * @param maxPrice		最大价格
	 * @param request
	 */
	PageModel getGrid(String spfl, String id, String type, Integer page, Integer times, Integer minPrice, Integer maxPrice,String mobileMove,String currentDoingId,
			HttpServletRequest request);
	
	void getGridBruce(Integer size, HttpServletRequest request);
	
	/**
	 * author BruceZhang
	 * @param doingId  微博ID
	 * @return 查询微博的标签
	 * @throws AppBusinessException
	 */
	List<String> getTagByDoing(String doingId)throws AppBusinessException;
	
	//通过标签集合查询产品
	PageModel getProductByTags(String tags)throws AppBusinessException;
	
	/**
     * author BruceZhang
     * @param tags      标签的集合
     * @return 通过标签集合查询微博
     * @throws AppBusinessException
     */
    List<Doing> getDoingByTags(String tags, Integer page)throws AppBusinessException;
    
    /**
     * author BruceZhang
     * @param  tags      标签的集合
     * @return 通过标签集合查询微博总数
     * @throws AppBusinessException
     */
    Integer getDoingCountByTags(String tags)throws AppBusinessException;
    
    /**
     * author BruceZhang
     * @param map  member:会员ID
     * @return 查询我的分享
     * @throws AppBusinessException
     */
    PageModel getDoingByMember(String member, Integer page)throws AppBusinessException;
    /**
     * author BruceZhang
     * @param map  member:会员ID
     * @return 查询我的分享总数
     * @throws AppBusinessException
     */
    Integer getDoingCountByMember(String member)throws AppBusinessException;
    
    /**
     * author BruceZhang
     * @param map  member:会员ID
     * @return 查询我的收藏
     * @throws AppBusinessException
     */
    PageModel getDlByMember(String member, Integer page)throws AppBusinessException;
    /**
     * author BruceZhang
     * @param map  member:会员ID
     * @return 查询我的收藏总数
     * @throws AppBusinessException
     */
    Integer getDlCountByMember(String member)throws AppBusinessException;
    
    /**
     * author BruceZhang
     * @param discussId : 话题ID
     * @return 查询话题微博
     * @throws AppBusinessException
     */
    PageModel getDoingByDiscuss(String discussId, Integer page)throws AppBusinessException;
    /**
     * author BruceZhang
     * @param discussId : 话题ID
     * @return 查询话题微博总数
     * @throws AppBusinessException
     */
    Integer getDoingCountByDiscuss(String discussId)throws AppBusinessException;
    
    /**
     * author brucezhang
     * @param snick : 卖家昵称
     * @return 查询好店微博
     * @throws appbusinessexception
     */
    PageModel getDoingBySnick(String snick, Integer page)throws AppBusinessException;
    /**
     * author BruceZhang
     * @param snick : 卖家昵称
     * @return 查询好店微博总数
     * @throws AppBusinessException
     */
    Integer getDoingCountBySnick(String snick)throws AppBusinessException;
	
}
